package {
	import flash.display.Sprite;
	import flash.display.Loader;
	import flash.display.LoaderInfo;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	public class bloader extends Sprite {
		private var parameters:Object;
		private var loader:Loader;
		private var button:TransparentButton;
		
		public function bloader(){
			parameters = LoaderInfo(this.root.loaderInfo).parameters;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			loader = new Loader();
			loader.load(new URLRequest(parameters.src))
			addChild(loader);
			button = new TransparentButton(stage.stageWidth, stage.stageHeight);
			button.addEventListener(MouseEvent.CLICK, onClick);
			addChild(button);
		}
		
		private function onClick(e:MouseEvent):void {
	    	var urlRequest:URLRequest=new URLRequest(parameters.href);
	    	navigateToURL(urlRequest, "_blank");
		}

	}
}


import flash.display.DisplayObject;
import flash.display.Shape;
import flash.display.SimpleButton;

class TransparentButton extends SimpleButton {
    private var upColor:uint   = 0xFFCC00;
    private var bwidth:uint      = 60;
	private var bheight:uint     = 60;

    public function TransparentButton(pwidth:uint, pheight:uint) {
    	bwidth = pwidth;
    	bheight = pheight;
        hitTestState   = new ButtonDisplayState(upColor, bwidth, bheight);
        hitTestState.x = 0;
        hitTestState.y = 0;
        useHandCursor  = true;
    }
}

class ButtonDisplayState extends Shape {
    private var bgColor:uint;
	private var bwidth:uint      = 60;
	private var bheight:uint     = 60;

    public function ButtonDisplayState(bgColor:uint, pwidth:uint, pheight:uint) {
        this.bgColor = bgColor;
    	bwidth = pwidth;
    	bheight = pheight;
        draw();
    }

    private function draw():void {
        graphics.beginFill(bgColor);
        graphics.drawRect(0, 0, bwidth, bheight);
        graphics.endFill();
    }
}
